.traces .trace {
  border: 1px solid var(--border-accent);
  border-radius: 1px;
  margin-bottom: 8px;
}

.traces .trace-header {
  cursor: pointer;
  padding: 6px 8px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border-accent);
}

.traces .trace.error .trace-header {
  background: var(--danger-tint);
  border-color: var(--status-danger);
}

.traces .trace.error .trace-header strong {
  color: var(--status-danger);
}

.traces .trace-header .muted {
  color: var(--text-muted-2);
  margin-left: 6px;
}

.traces .trace-header .trace-caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 6px;
  vertical-align: middle;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid var(--text-default);
}

.traces .trace-header .trace-caret.open {
  transform: rotate(90deg);
}

.traces .trace-body {
  padding: 6px 8px;
}

.traces .section-title {
  font-weight: 600;
  margin: 6px 0 4px;
}

.traces ul.kv {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.traces ul.kv li {
  font-family: monospace;
  font-size: 12px;
  padding: 1px 0;
}

.traces ul.kv .k {
  color: var(--text-default);
  margin-right: 4px;
}

.traces ul.kv .v {
  color: var(--status-success);
  word-wrap: break-word;
}

.traces ul.events {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.traces ul.events li {
  margin: 6px 0;
  padding: 6px 0;
  border-bottom: 1px dashed var(--divider);
}

.traces ul.events li:last-child {
  border-bottom: 0;
}

.traces .evt-time {
  margin-right: 6px;
  color: var(--axis-text);
}

.traces .evt-name {
  font-weight: 600;
  margin-right: 8px;
}

.traces .evt-span {
  color: var(--text-default);
  margin-left: 6px;
}
